[NTG-context] Re: Equivalent of the \cancel command with conTeXt

2023-08-22 Thread Fabrice Couvreur
cture cross; > cross := image(draw (0,0)--(1,1); draw (0,1)--(1,0);); > draw cross xscaled \overlaywidth yscaled \overlayheight withpen pencircle > scaled .8pt ; > \stopuniqueMPgraphic > > \defineoverlay[canceloverlay][\uniqueMPgraphic{cross out}] > > \define[1]\cancel{% >

[NTG-context] Re: Equivalent of the \cancel command with conTeXt

2023-08-22 Thread Alexandre Christe
; \stopuniqueMPgraphic \defineoverlay[canceloverlay][\uniqueMPgraphic{cross out}] \define[1]\cancel{%  \ifmmode  \mframed[background=canceloverlay, frame=off, offset=overlay]{{#1}}%  \else%  \framed[background=canceloverlay, frame=off, offset=overlay]{{#1}}%  \fi% } Maybe something else is available nowadays

Re: [NTG-context] Is this possible to do the same

2022-12-12 Thread Ursula Hermann via ntg-context
; \stopuniqueMPgraphic \defineoverlay[canceloverlay][\uniqueMPgraphic{cross out}] \define[1]\cancel{% \ifmmode \mframed[background=canceloverlay, frame=off, offset=overlay]{{#1}}% \else% \framed[background=canceloverlay, frame=off, offset=overlay]{{#1}}% \fi% } \starttext \dots E.g

Re: [NTG-context] Is this possible to do the same

2022-12-12 Thread Gavin via ntg-context
scaled .8pt ; \stopuniqueMPgraphic \defineoverlay[canceloverlay][\uniqueMPgraphic{cross out}] \define[1]\cancel{% \ifmmode \mframed[background=canceloverlay, frame=off, offset=overlay]{{#1}}% \else% \framed[background=canceloverlay, frame=off, offset=overlay]{{#1}}% \fi% } \starttext

Re: [NTG-context] \hpos in math

2022-12-06 Thread Gavin via ntg-context
\mpos macro that uses >> \hpos but sets the contents as display-style math. This isn’t great for >> spacing, and it does't adapt to different math styles. \framed has a math >> version, \mframed, that sets the contents in the appropriate math style. If >> anyone know a way to

Re: [NTG-context] \hpos in math

2022-12-06 Thread Hans Hagen via ntg-context
version of \hpos? The contents of \hpos are set as text, even when \hpos is in mathematics, so I wrote an \mpos macro that uses \hpos but sets the contents as display-style math. This isn’t great for spacing, and it does't adapt to different math styles. \framed has a math version, \mframed

[NTG-context] \hpos in math

2022-12-05 Thread Gavin via ntg-context
version of \hpos? The contents of \hpos are set as text, even when \hpos is in mathematics, so I wrote an \mpos macro that uses \hpos but sets the contents as display-style math. This isn’t great for spacing, and it does't adapt to different math styles. \framed has a math version, \mframed

[NTG-context] mframed and alignment width

2022-07-14 Thread Hans-Joerg Schurr via ntg-context
Hello everyone, I'm using \startaligned with pairs and a distance to represent inference steps, one per row. Now I would like to sometimes add a vertical bar to the left of the rows and one below the last row. I was able to achieve this using \mframed, but now the contented inside the framed box

Re: [NTG-context] Framed mathematics

2018-12-07 Thread Wolfgang Schuster
Mathias Schickel schrieb am 07.12.18 um 12:09: Dear list, it seems that \mframed does not align properly. Compare the example fount at https://www.contextgarden.net/Framed#Location_parameter to the compiled example attached. What can I do to get a correctly aligned framed formula

[NTG-context] Framed mathematics

2018-12-07 Thread Mathias Schickel
Dear list,it seems that \mframed does not align properly. Compare the example fount at https://www.contextgarden.net/Framed#Location_parameter to the compiled example attached.What can I do to get a correctly aligned framed formula?Many thanks for you help,Mathias mframed.tex Description: TeX

Re: [NTG-context] Framing multiline equations

2016-05-22 Thread Hans Hagen
<- works like a charm \mframed[offset=1mm,loffset=3mm,roffset=3mm] {a + b = c} \stopformula \startformula \startalign <- that's an example multiline equation \NC c - a = \NC b \NR<- unframed it works \NC

[NTG-context] Framing multiline equations

2016-05-22 Thread L.S.-Soc
rks like a charm \mframed[offset=1mm,loffset=3mm,roffset=3mm] {a + b = c} \stopformula \startformula \startalign <- that's an example multiline equation \NC c - a = \NC b \NR<- unframed it works \NC d + c - b = \NC a \NR \stopalign \st

Re: [NTG-context] Bussproofs or derivation trees

2014-09-05 Thread Trond Thorbjørnsen
{\mframed[frame=off, topframe=on, bottomframe=on, frameoffset=\dimexpr.254\baselineskip\relax, height=\lineheight ]} \def\borderdttop{\mframed[frame=off, bottomframe=on, frameoffset=\dimexpr.254\baselineskip\relax, height=\lineheight ]} \definehspace[spacedt] [2

Re: [NTG-context] \mframed not aligned in mkiv

2013-10-22 Thread Otared Kavian
, at 22:18, Aditya Mahajan adit...@umich.edu wrote: On Mon, 21 Oct 2013, Otared Kavian wrote: Dear Hans, I noticed a difference between mkii and mkiv in the behavior of \mframed: it seems that in mkiv the frame is not vertically aligned with the the + sign in the following example (or rather

Re: [NTG-context] \mframed not aligned in mkiv

2013-10-22 Thread Aditya Mahajan
On Tue, 22 Oct 2013, Otared Kavian wrote: Hi Aditya, I wikified your remarks, http://wiki.contextgarden.net/Math/Display#Shaded_background_for_part_of_a_displayed_equation Rather than \def\graymath{\mframed[frame=off, background=color, backgroundcolor=gray

[NTG-context] \mframed not aligned in mkiv

2013-10-21 Thread Otared Kavian
Dear Hans, I noticed a difference between mkii and mkiv in the behavior of \mframed: it seems that in mkiv the frame is not vertically aligned with the the + sign in the following example (or rather it is not vertically centered, please see the attached PDF produced with ConTeXt ver

Re: [NTG-context] \mframed not aligned in mkiv

2013-10-21 Thread Aditya Mahajan
On Mon, 21 Oct 2013, Otared Kavian wrote: Dear Hans, I noticed a difference between mkii and mkiv in the behavior of \mframed: it seems that in mkiv the frame is not vertically aligned with the the + sign in the following example (or rather it is not vertically centered, please see

Re: [NTG-context] \mframed not aligned in mkiv

2013-10-21 Thread Otared Kavian
Thanks Aditya! I overlooked this change in mkiv… Best regards: OK On 21 oct. 2013, at 22:18, Aditya Mahajan adit...@umich.edu wrote: On Mon, 21 Oct 2013, Otared Kavian wrote: Dear Hans, I noticed a difference between mkii and mkiv in the behavior of \mframed: it seems that in mkiv

Re: [NTG-context] Alignment of inmframed

2013-06-14 Thread Hans Hagen
\pack_framed_mc_one} \unexpanded\def\pack_framed_mc_end {\egroup \egroup} \unexpanded\def\pack_framed_mc_nop#1% {\pack_framed_mc_begin \mframed{\xypos\pack_framed_mc_two#1}% \pack_framed_mc_end} \unexpanded\def\pack_framed_mc_yes[#1]#2% {\pack_framed_mc_begin \mframed[#1]{\xypos

[NTG-context] [***SPAM***] Background color with dotted frame formula

2013-04-11 Thread hwitloc
pencircle scaled 1pt dashed withdots; setbounds currentpicture to boundingbox OverlayBox; \stopuniqueMPgraphic \defineoverlay[Label][\useMPgraphic{Label}] \def\dottext#1% { \mframed[frame=off, background=Label, location=low] { #1 } } \setupcolors[state=start] \def\rndgraymath{\mframed[frame

Re: [NTG-context] [***SPAM***] Background color with dotted frame formula

2013-04-11 Thread Hans Hagen
OverlayLineColor ; \stopuniqueMPgraphic \defineoverlay[LabelA][\uniqueMPgraphic{LabelA}] \defineoverlay[LabelB][\uniqueMPgraphic{LabelB}] \def\VariantA{\mframed[foregroundstyle=\tfc,frame=off,background=LabelA,backgroundoffset=3pt,backgroundcolor=red]} \def\VariantB{\mframed[foregroundstyle=\tfc,frame

Re: [NTG-context] How to draw a red frame of a row in a matrix?

2012-07-25 Thread Hans Hagen
\NR \NC a_{i1} \NC a_{i2} \NC \cdots \NC a_{in} \NR \NC \vdots \NC \vdots \NC \ddots \NC \vdots \NR \NC a_{m1} \NC a_{m2} \NC \cdots \NC a_{mn} \NR \stopmatrix \stopformula But \frame or \inframe is not working inside matrix. Is there a way to do that? maybe \mframed

Re: [NTG-context] How to draw a red frame of a row in a matrix?

2012-07-25 Thread dalyoung
Dear Hans, Thank you for quick answer and for reminding me \mframed. \mframed is working if I enclose one term like ... \NC{\mframed[]{x+y}}\NC ...\NC\NR. But I'd like to enclose the whole row in one frame. I apply \mframed to every term and get close result except there are gaps between

Re: [NTG-context] How to draw a red frame of a row in a matrix?

2012-07-25 Thread Otared Kavian
Hi Dalyoung, Is this what you want: \setupcolors[state=start] \def\RedMath{\mframed[frame=on, framecolor=red, offset=2pt, % background=color, % backgroundcolor=lightred, % backgroundoffset=2pt ]} \starttext \startformula \startmatrix[left={\left

Re: [NTG-context] How to draw a red frame of a row in a matrix?

2012-07-25 Thread Wolfgang Schuster
. Is there a way to do that? maybe \mframed He’s looking for \HL and \VL commands like the table below has to frame a complete row in the matrix. \starttext \startformula \startmatrix[left={\left(\,},right={\,\right)}] \NC a_{11} \NC a_{12} \NC \cdots \NC a_{1n} \NR \NC \vdots \NC \vdots \NC \vdots \NC

Re: [NTG-context] overscored or overlined text … (or whatever it should be called)

2012-01-26 Thread Hans Hagen
On 25-1-2012 21:17, Aditya Mahajan wrote: @Hans: Can we have \definemframed etc as well? sure, the next beta will have ... \starttext \dontleavehmode test \mframed{x} test $x^{\mframed{x}}$ test \inmframed{x} test $x^{\inmframed{x}}$ test \definemathframed[whatever][location=low

Re: [NTG-context] overscored or overlined text … (or whatever it should be called)

2012-01-25 Thread Aditya Mahajan
{\mathsurround\zeropoint$#1$}. But for this to work in subscripts and superscripts, you must use math palette. IIRC, \mframed does that. In principle: \mframed[background=strikeme]{...} should work (untested). @Hans: Can we have \definemframed etc as well

Re: [NTG-context] overscored or overlined text … (or whatever it should be called)

2012-01-25 Thread Philipp A.
2012/1/25 Aditya Mahajan adit...@umich.edu Better is to use: \StrikeMeFrame{\mathsurround\zeropoint$#1$}. But for this to work in subscripts and superscripts, you must use math palette. IIRC, \mframed does that. In principle: \mframed[background=strikeme]{**...} should work (untested

Re: [NTG-context] overscored or overlined text … (or whatever it should be called)

2012-01-25 Thread Aditya Mahajan
On Thu, 26 Jan 2012, Philipp A. wrote: 2012/1/25 Aditya Mahajan adit...@umich.edu Better is to use: \StrikeMeFrame{\mathsurround\zeropoint$#1$}. But for this to work in subscripts and superscripts, you must use math palette. IIRC, \mframed does that. In principle: \mframed[background

[NTG-context] highlighting aligned formulas

2011-07-20 Thread Andreas Richter
Hello, Is it possible (using ConTeXt MKII) to put a frame (and/or other highlighters) around an aligned multiline formula, and also around a single line of this equation array? (The equation number should align correctly outside the frame.) \mframed within an alignment seems to refuse the job

[NTG-context] Wrong location of mframed

2011-01-22 Thread Aditya Mahajan
Hi, In MkIV, \mframed does not place the result in the middle of the math axis. Consider, \starttext \startformula f(x) = \mframed{\frac{1}{2}}^{\mframed{\frac{1}{2}}} \stopformula \stoptext The MkII and MkIV results are attached. Adityaattachment: test-mkii.pngattachment: test

Re: [NTG-context] mframed, setupinteractions

2009-05-11 Thread Hans Hagen
Alan BRASLAU wrote: Thanks (\setupinteractions[option=max], \mframed[background=color])! Please note that the vertical spacing seems to be off (raised) for \mframed... minimal example: \starttext \startformula A = B + \mframed[frame=off,background=color,backgroundcolor=gray]{C} \stopformula

Re: [NTG-context] mframed, setupinteractions

2009-05-11 Thread Alan BRASLAU
On Monday 11 May 2009 15:40:04 Hans Hagen wrote: Alan BRASLAU wrote: Thanks (\setupinteractions[option=max], \mframed[background=color])! Please note that the vertical spacing seems to be off (raised) for \mframed... minimal example: \starttext \startformula A = B + \mframed

Re: [NTG-context] mframed, setupinteractions

2009-05-11 Thread Aditya Mahajan
On Mon, 11 May 2009, Hans Hagen wrote: Alan BRASLAU wrote: Thanks (\setupinteractions[option=max], \mframed[background=color])! Please note that the vertical spacing seems to be off (raised) for \mframed... minimal example: \starttext \startformula A = B + \mframed[frame=off,background

Re: [NTG-context] mframed, setupinteractions

2009-05-11 Thread Hans Hagen
Aditya Mahajan wrote: On Mon, 11 May 2009, Hans Hagen wrote: Alan BRASLAU wrote: Thanks (\setupinteractions[option=max], \mframed[background=color])! Please note that the vertical spacing seems to be off (raised) for \mframed... minimal example: \starttext \startformula A = B + \mframed

[NTG-context] mframed (mkiv) bug

2009-05-10 Thread Alan BRASLAU
\mframed misbehaves under mkiv (latest minimals) minimal example: \setupcolors[state=start] \starttext \mframed[frame=off,background=color,backgroundcolor=yellow]{k_2 \propto \langle N \rangle^{\alpha}} \stoptext - framed text, white background (works correctly under mkii: no frame, yellow

Re: [NTG-context] \useURL not working with '#' and '_' in URL in newest beta

2009-04-22 Thread Hans Hagen
\}} shifted(1u,0u); % no braces \stopMPcode \stoptext I remember having problems with at least {, }, #, and with the usage of the following macro inside metapost: % outside: \def\combine#1{\hbox to .5em{}\hbox to 0pt{\hss\color[red]{\mframed[frame=off]{#1}}\hss}\hbox to 0pt{\hss\color[darkgray]{o}\hss

Re: [NTG-context] \useURL not working with '#' and '_' in URL in newest beta

2009-04-21 Thread Mojca Miklavec
); % no braces \stopMPcode \stoptext I remember having problems with at least {, }, #, and with the usage of the following macro inside metapost: % outside: \def\combine#1{\hbox to .5em{}\hbox to 0pt{\hss\color[red]{\mframed[frame=off]{#1}}\hss}\hbox to 0pt{\hss\color[darkgray]{o}\hss}} % usage inside

[NTG-context] colored backgrounds in displayed math

2009-04-09 Thread Sanjoy Mahajan
In displayed math I was trying to highlight a piece of a formula using a gray background. After a few spacing failures with \framed, I discovered \mframed in the core-rul.tex source file. The comments there say: %D As usual, one can specify in what way the text should be %D framed. One should

Re: [NTG-context] colored backgrounds in displayed math

2009-04-09 Thread Wolfgang Schuster
Hi Sanjoy, welcome back In displayed math I was trying to highlight a piece of a formula using a gray background. After a few spacing failures with \framed, I discovered \mframed in the core-rul.tex source file. The comments there say: Use backgroundoffset, not frameoffset. Wolfgang

Re: [NTG-context] Which manual for basic drawing?

2007-05-02 Thread James Buchanan
Aditya Mahajan wrote: Here is an example: \setupcolors[state=start] \def\solutionbox {\dosingleempty\dosolutionbox} \def\dosolutionbox[#1]% {\mframed[width=2em,background=color,backgroundcolor=lightgreen,#1] {\strut}} \starttext [cut] \stoptext Aditya Thanks

Re: [NTG-context] Which manual for basic drawing?

2007-05-01 Thread Aditya Mahajan
]% {\mframed[width=2em,background=color,backgroundcolor=lightgreen,#1] {\strut}} \starttext Not aligned \startformula \startalign[n=1] \NC 6 + 7 + 4 = \solutionbox \NR \NC 16 + 5 + 4 = \solutionbox[width=1cm] \NR \NC 6 + 200 + 4 = \solutionbox[width=3cm] \NR \stopalign \stopformula

Re: [NTG-context] Keep framed on the baseline

2006-01-14 Thread Mojca Miklavec
the numbers on the same baseline and let the frame dip below the baseline. What about \mframed? (Probably already evident from the other mail.) Mojca ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context

Re: [NTG-context] Reg. fonts and math

2006-01-13 Thread Aditya Mahajan
as a = b (*) 14. Allow a framed command that works with align and aligned. So that a \implies\mframed{ \startaligned \NC b \NC= c \NR \NC e \NC= f \NR \NC g \NC= h \NR \stopaligned} Comes as +-+ | b = c | a = | e = f | | g = h | +-+ 15

[NTG-context] mframed setup

2006-01-12 Thread Aditya Mahajan
What is the \setup... command that can be used to configure the frames typeset by \mframed? Thanks, Aditya ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context

Re: [NTG-context] mframed setup

2006-01-12 Thread Taco Hoekwater
Aditya Mahajan wrote: What is the \setup... command that can be used to configure the frames typeset by \mframed? There is no such command, so just use the optional argument to \mframed, like: $$ \mframed[framecolor=red]{E=mc^2} $$ Cheers, Taco

[NTG-context] Re: Some $\mframed{math}$ questions

2005-12-03 Thread Aditya Mahajan
--- On Dec 2, Mojca Miklavec wrote --- 1. What's the best way to frame a formula like here: \placeformula \startformula \mframed{x^2+y^2=z^2} \stopformula The problem is that: - formula number is shifted downwards in comparison to the formula without a number - I don't know how to do

[NTG-context] Some $\mframed{math}$ questions

2005-12-02 Thread Mojca Miklavec
Hello, I would like to ask a couple of questions about frames and numbers in math formulas. 1. What's the best way to frame a formula like here: \placeformula \startformula \mframed{x^2+y^2=z^2} \stopformula The problem is that: - formula number is shifted downwards in comparison

[NTG-context] Re: Some $\mframed{math}$ questions

2005-12-02 Thread Aditya Mahajan
--- On Dec 2, Mojca Miklavec wrote --- 1. What's the best way to frame a formula like here: \placeformula \startformula \mframed{x^2+y^2=z^2} \stopformula The problem is that: - formula number is shifted downwards in comparison to the formula without a number - I don't know how to do

Re: [NTG-context] Boxed formula

2005-10-01 Thread Jilani Khaldi
\startformula \mframed[offset=.3em,rulethickness=1pt]{ I=x-\sqrt2\,\arctan\frac{x}{\sqrt2}+C} \stopformula it does typeset a displayed formula. However, you could still force displayed style by adding a \displaystyle command at the beginning of your \mframed argument. That's ok now

Re: [NTG-context] Boxed formula

2005-09-30 Thread David Munger
The way I usually do it: \startformula \mframed[offset=.3em,rulethickness=1pt]{a^2 + b^2 = c^2} \stopformula Regards, David Le Vendredi 30 septembre 2005 à 13:41 +0200, Jilani Khaldi a écrit : Hi All, how to make a boxed formula with ConTeXt? Thanks

Re: [NTG-context] Boxed formula

2005-09-30 Thread Jilani Khaldi
David Munger wrote: The way I usually do it: \startformula \mframed[offset=.3em,rulethickness=1pt]{a^2 + b^2 = c^2} \stopformula Thank you for your answer. I seems that \startformula .. \stopformula doesn't have any effect to produce a dispaly mode formula. so: \startformula \mframed

Re: [NTG-context] Boxed formula

2005-09-30 Thread David Munger
Jilani, Thank you for your answer. I seems that \startformula .. \stopformula doesn't have any effect to produce a dispaly mode formula. When I try: \startformula \mframed[offset=.3em,rulethickness=1pt]{ I=x-\sqrt2\,\arctan\frac{x}{\sqrt2}+C} \stopformula it does typeset a displayed

Re: [NTG-context] \presentationstep

2004-11-10 Thread David Munger
. You can get the module here: http://cfd.homelinux.org/tex/ The current problem, in its simplest form, is that using \mframed breaks the spacing. Minimal example: \starttext We aim to get this spacing: \startformula a + b \stopformula but when using: \startformula a \mframed{+ b} \stopformula we

Re: [NTG-context] \presentationstep

2004-11-08 Thread David Munger
] [EMAIL PROTECTED] \ifUseSteps% [EMAIL PROTECTED] [EMAIL PROTECTED] \fi% \fi% \ifmmode\expandafter\mframed\else\expandafter\framed\fi% [EMAIL PROTECTED],frame=off,offset=overlay]{#1}% \ifmmode\;\fi} [EMAIL PROTECTED] [EMAIL PROTECTED];\fi}% \ifUseSteps% [EMAIL PROTECTED

Re: [NTG-context] \presentationstep

2004-11-06 Thread David Munger
PROTECTED] \ifUseSteps% [EMAIL PROTECTED] [EMAIL PROTECTED] \fi% \fi% \ifmmode\expandafter\mframed\else\expandafter\framed\fi% [EMAIL PROTECTED],frame=off,offset=overlay]{#1}% \ifmmode\;\fi} [EMAIL PROTECTED] [EMAIL PROTECTED];\fi}% \ifUseSteps% [EMAIL PROTECTED]@next